<?php
//
//  VictoryCMS - Content managment system and framework.
//  Copyright (C) 2009  Lewis Gunsch
//
//  This file is part of VictoryCMS.
//  
//  VictoryCMS is free software: you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation, either version 3 of the License, or
//  (at your option) any later version.
//
//  VictoryCMS is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//  
//  You should have received a copy of the GNU General Public License

/**
 * VictoryCMS - TestQueries
 * 
 * @license http://www.gnu.org/licenses/gpl.html
 * @author Lewis Gunsch
 * @filesource
 * @package QuerySets
 */

/**
 * Just for testing the SqlSet.
 * 
 * @package QuerySets
 */
class TestQueries extends SqlSet {
	
	/**
	 * @see trunk/include/database_abstraction_layer/SqlSet#initQuerySet()
	 */
	protected function initQuerySet() {
		$settings = VcmsSettings::getInstance();
		$prefix = $settings->getDbPrefix();
		
		// Postgres DB Queries
		if ($settings->getDbType() == "pgsql") {
			$this->set["version"] = "SELECT version()";
			$this->set["drop_test_table"] = 
				"DROP TABLE ".$prefix."test_table";
			$this->set["create_test_table"] = 
				"CREATE TABLE ".$prefix."test_table (
					name VarChar(30),
					data TEXT
				)";
			$this->set["put_row"] = 
				"INSERT INTO ".$prefix."test_table (name, data)
				VALUES ('%s', '%s')";
			$this->set["select_test_table"] = 
				"SELECT %s FROM ".$prefix."test_table";
		} elseif ($settings->getDbPrefix() == "mysql") {
			
		}
	}
}
?>